<template>
  <div class="app-list">
    <el-table
    :data="appInfoList"
    style="width: 100%">
    <el-table-column
      fixed
      type="index"
      label="序号"
      width="150">
    </el-table-column>
    <el-table-column
      prop="appId"
      label="appID">
    </el-table-column>
    <el-table-column
      prop="appCode"
      label="应用编码">
    </el-table-column>
    <el-table-column
      prop="appName"
      label="项目名">
    </el-table-column>
    <el-table-column
      fixed="right"
      label="操作">
      <template slot-scope="scope">
        <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
      </template>
    </el-table-column>
  </el-table>
  </div>
</template>

<script>
import { appInfo } from "@/api/system/agingDesign";
  export default {
    data() {
      return {
        appInfoList: []
      }
    },
    created(){
        this.getAppInfo()
    },
    methods:{
        handleClick(row) {
        this.$router.push({
          path: '/system/urltable/',
          query: {
            appId: row.appId
          }
        })
        console.log(row);
      },
        getAppInfo(){
            const appInfoParams = {
                pageNo: 1,
                pageSize: 12,
                appId: 123456
            }
            console.log('getAppInfo');
            appInfo(appInfoParams).then((res) => {
                console.log(res);
                this.appInfoList = res.rows
            })
        }
    }
  }
</script>

<style scoped>
.app-list{
  margin: 20px;
}
</style>
